#!/usr/bin/env python

#!/usr/bin/env python
import wsgiref.handlers

from google.appengine.ext import webapp
from google.appengine.ext.webapp import template
from YOURS.puzzle import puzzle
from abstractPuzzle import yieldPuzzleInstance
import logging



class MainHandler(webapp.RequestHandler):
    def get(self):
            instance = yieldPuzzleInstance(puzzle)
            debug(instance)
            instance.get(self)
    def post(self):
            instance = yieldPuzzleInstance(puzzle)
            debug(instance)
            instance.post(self)   

def debug(instance):
    #check to make sure you did your homework
    instance.nickname()
    instance.uniqueName()
    instance.generate()
def main():
  application = webapp.WSGIApplication([('/', MainHandler)],
                                       debug=True)
  wsgiref.handlers.CGIHandler().run(application)
if __name__ == '__main__':
  main()
